package cn.gok.io;

import java.io.*;

/**
 * @ClassName 字符流
 * @Description TODO
 * @Author HP
 * @Date 16:24 2022/7/7
 * @Version 1.0
 **/
public class 字符流 {
    public static void main(String[] args) throws IOException {
        Reader re = new FileReader("D:\\workspace_idea\\javase_project\\day4\\src\\cn\\gok\\io\\a1");
        Writer wr = new FileWriter("D:\\workspace_idea\\javase_project\\day4\\src\\cn\\gok\\io\\b2");
        char c2[] = new char[100];
        int len=0;
        while ((len=re.read(c2))!=-1){
            String string = new String(c2,0,len);
            wr.write(string);
        }
        wr.close();
        re.close();


    }
    }